<!-- 超级银行家用户管理页面 -->
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-md-12">
        <ol class="breadcrumb">
            <li><a>主页</a></li>
            <li><a>超级兑</a></li>
            <li class="active"><strong>路由管理</strong></li>
        </ol>
    </div>
</div>
<!-- 主要内容 -->
<div class="wrapper wrapper-content animated fadeIn" ng-app ng-controller="excRouteQueryCtrl">
    <form class="form-horizontal" id="form1">
        <div class="row">
            <div class="col-lg-12">
                <div class="">
                    <div class="panel-body ibox float-e-margins">
                        <div class="ibox-content">
                            <div class="ibox-title">
                                <h5>路由查询</h5>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">核销渠道编号:</label>
                                <div class="col-sm-2">
                                    <input type="text" class="form-control" ng-model="info.channelNo">
                                </div>
                                <label class="col-sm-2 control-label">核销渠道名称:</label>
                                <div class="col-sm-2">
                                    <input type="text" class="form-control" ng-model="info.channelName">
                                </div>
                                <label class="col-sm-2 control-label">商品ID:</label>
                                <div class="col-sm-2">
                                    <select  name="pId" id="autocomplete-select1"
                                             ng-model="info.pId" ng-options="x.value as x.text for x in productList"
                                             style="width: 100%" chosen chosen-data="pId" chosen-keyup="getStates">
                                    </select>
                                </div>
                            </div>
                            <div class="form-group" style="margin-top:30px">
                                <div class="col-sm-8">
                                    <label class="col-sm-2 control-label"></label>
                                    <button class="btn btn-primary6 btn-mr20" type="button" ng-click="query()" >查询</button>
                                    <button class="btn btn-primary3 btn-mr20" type="button" ng-click="clear()" >清空</button>
                                    <a class="btn btn-primary5 btn-mr20" type="button" ng-show="hasPermit('excRoute.addRoute')" target="_blank" ui-sref="exchange.routeAdd"  >新增</a>
                                    <button class="btn btn-new btn-mr20" type="button" ng-show="hasPermit('excRoute.importDiscount')" ng-click="importDiscountShow()" >批量导入商品</button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="panel-body ibox float-e-margins">
                        <div class="ibox-title">
                            <div class="ibox-content">
                                <div class="ibox-title">
                                    <h5>路由列表</h5>
                                </div>
                                <div class="form-group">
                                    <div class="gridStyle" ui-grid="userGrid" ui-grid-selection ui-grid-pagination
                                         ui-grid-resize-columns ui-grid-pinning></div>
                                    <div ng-show="loadImg" class="timg"></div>
                                </div>
                            </div>
                        </div>
                        <div style="height:30px"></div>
                    </div>
                </div>
            </div>
        </div>
    </form>

    <form class="form-horizontal" id="form2" name="horizontalAdd" novalidate>
        <div id="importDiscount" class="modal fade" tabindex="-1" role="dialog">
            <div class="modal-dialog" style="width: 900px">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal">
                            &times;</button>
                        <h3 class="modal-title">批量导入商品</h3>
                    </div>
                    <div class="modal-body">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">导入文件:</label>
                            <div class="col-sm-3 checkbox ">
                                <input type="file" nv-file-select="" ng-model="fileSelect" uploader="uploader" multiple/>
                                <table class="table">
                                    <tbody>
                                    <tr ng-repeat="item in uploader.queue">
                                        <td>
                                            <strong>{{ item.file.name }}</strong>
                                        </td>
                                        <td nowrap>
                                            <button type="button" class="btn btn-danger btn-xs" ng-click="item.remove()">
                                                <span class="glyphicon glyphicon-trash"></span>删除
                                            </button>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                            <label class="col-sm-2 control-label"></label>
                            <div class="col-sm-3 checkbox ">
                                <a href="excActRoute/downloadTemplate" >批量导入商品模板下载</a>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"></label>
                            <div class="col-sm-6">
                                <button class="btn btn-primary btn-mr20" type="button" ng-click='importDiscount()'
                                        id="btnSubmit" ng-disabled="uploader.queue.length==0||submitting">提交</button>
                                <button class="btn btn-primary8" type="button" ng-click='importDiscountHide()' >取消</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>

</div>